CC		=	gcc
CFLAGS		=	-g -c -o  
INC_DIR		=	-Iinclude
BLD_DIR		=	build
TST_DIR		=	test
AR		=	ar
AR_OPT		=	-rcs 

all:	networklib	test

networklib:	conn
	$(AR)	$(AR_OPT) $(BLD_DIR)/libcnetworklib.a $(BLD_DIR)/connections.o
	cp include/networklib.h $(BLD_DIR)
	cp $(BLD_DIR)/libcnetworklib.a $(TST_DIR)/
	cp $(BLD_DIR)/networklib.h $(TST_DIR)/
conn:
	$(CC)	$(CFLAGS) $(BLD_DIR)/connections.o $(INC_DIR) src/connections.c

clean:
	rm -f $(BLD_DIR)/*.o $(BLD_DIR)/*.a
